<?php
$sql = "select * from tttj.eye where appid = 98 and entry = 1 and dstatus = 1 and type = 5 and link != '' ORDER BY position asc";
$eye = getarrrecord($sql);
foreach($eye as $k=>$v){
    if(strstr($_SERVER['HTTP_USER_AGENT'],'MicroMessenger')){
        $eye[$k]['read'] = '1';
    }else{
        $eye[$k]['read'] = '0';
    }
    if($v['id'] == '40'){
        $eye[$k]['read'] = '0';
    }
}
$tpl->assign('eye',$eye);
$sql="select title,pic,link,find_desc from tttj.find_activity order by id asc limit 4";
$activity = getarrrecord($sql);
$tpl->assign('activity',$activity);
$tpl->display("wx/templates/{$tp}.html");
?>